package proxyDemo.dongtai;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class Javaproxy1 implements InvocationHandler{
	private Opration op;
	public Javaproxy1() {
		System.out.println("Javaproxy1()");
	}
	public Javaproxy1(Opration op){
		this.op=op;
	}
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		System.out.println("代理前");
		Object obj=method.invoke(op, args);
		System.out.println("代理后");
		return obj;
	}

}
